package client;

import java.io.InputStream;
import java.io.ObjectInputStream;
import java.io.OutputStream;
import java.net.Socket;
import java.util.List;

import common.entity.Person;

public class Transceiver {

	public static void main(String[] args) throws Exception{
		Socket sk=new Socket("127.0.0.1",7777);
		OutputStream out=sk.getOutputStream();
		InputStream in=sk.getInputStream();
		ObjectInputStream oin=new ObjectInputStream(in);
		out.write("aaa\n".getBytes());	
		List<Person> ps=(List<Person>)oin.readObject();
		for(Person p:ps){
			System.out.println(p.getPname());
		}
		oin.close();
		out.close();
		sk.close();
	}

}
